<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class Controller_Marketing extends Controller_Template {
	public function actionIndex() {
		$this->addStyle('/styles/jquerytools/overlay.css');
		$this->addStyle('/styles/jquerytools/gallery.css');
		$this->addScript('/scripts/jquerytools/jquery.tools.min.js');
		$this->addScript('/scripts/plugin/gallery.js');
		
		$this->template->title = "MARKETING OPPORTUNITIES-".$this->settings['title'];
		$this->template->content = new View('marketing/index');
		$content = Model::factory('directory')->getItemByToken('gg6', 'text');
		$this->template->content->marketingText = $content;
		$items = Model::factory('directory')->getItems('marketing', 'position', 'ASC');
		$this->template->content->items = $items;
		$attachments = Model::factory('directory')->getAttachmentsByItem('marketing');
		$this->template->content->attachments = $attachments;
		$this->template->content->attachmentPath = "/content/directory/attachments/";
		$images = Model::factory('directory')->getImagesByItem('marketing');
		$this->template->content->images = $images;
	}
}
?>
